package com.libbase.kotlin.presenter

import com.chan.net.Result
import com.libbase.bean.NyqfBean
import com.base.kotlin.IModel
import com.base.kotlin.mvp.IView
import io.reactivex.Flowable
import retrofit2.http.GET
import retrofit2.http.Headers
import retrofit2.http.Query

interface NyqfContract {

    interface Model : IModel<Api> {
        fun getTitles(): Flowable<Result<NyqfBean>>?
    }

    interface View : IView {
        fun onSuccessNyqfTitle(result: Result<NyqfBean>)
    }

    interface Presenter {
        fun getTitles()
    }

    interface Api {
        @Headers("Tag:raw/master/nyqf_data.json")
        @GET("raw/master/nyqf_data.json")
        fun getNews(@Query("nav") nav: String): Flowable<Result<NyqfBean>>

        @Headers("Tag:raw/master/nyqf_titles.json")
        @GET("raw/master/nyqf_titles.json")
        fun getTitles(): Flowable<Result<NyqfBean>>
    }
}

